﻿@model WebSiteFool.Models.Article
@{
    ViewBag.Title = "Edit";
}
<script type="text/javascript">
    $().ready(function () {
        TJBlog.RichText._load();
        TJBlog.RichText._enablePreview();
    });
</script>
@using (Html.BeginForm("Edit", "Article", FormMethod.Post))
{
    @Html.AntiForgeryToken()
    @Html.ValidationSummary()
    <fieldset>
        <ul>
            <li>@Html.LabelFor(m => m.Title)
                @Html.TextBoxFor(m => m.Title)
                @Html.ValidationMessageFor(m => m.Title)
            </li>
            <li>@Html.LabelFor(m => m.Content)
                @Html.TextAreaFor(m => m.Content, new { id = "rich-content", onkeyup = "TJBlog.RichText._enablePreview();" })
                <div id="rich-preview">
                </div>
                @Html.ValidationMessageFor(m => m.Content)
            </li>
        </ul>
        <input type="submit" class="submit-button" value="Edit" />
    </fieldset>
}
